<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ page import="com.wframe.project.jnd.util.ServletUtils" %>
<%@ include file="/website/common/base.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    <title>${bean.name }_${webname }</title>
    <meta name="description"
          content="巨达药网judayw.com_广州巨孚达医药有限公司旗下的专业院外处方药采购平台，以处方药、新特药为核心品类，涵盖心脑血管、糖尿病、肝胆病等十多个专科用药，提供过万种药店畅销药。"/>
    <meta name="Keywords" content="药品采购,网上药品采购,处方药,新特药,心脑血管,糖尿病,药店畅销药,网上药店,网上买药,巨孚达,巨达药网,巨达"/>

    <%@ include file="/website/common/common.jsp" %>
    <link href="${webctx }/css/proInfo.css" rel="stylesheet" type="text/css"/>
    <link href="${ctx }/plugins/cityselect_d/css.css" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" type="text/css" href="${ctx }/plugins/font-awesome/css/font-awesome.min.css"/>

    <link href="${webctx }/css/sidebar.css?v=20170616" rel="stylesheet" type="text/css" />


    <style>
        .aaa img {
            background: url(${ctx }/website/images/noimage.gif) no-repeat;
            width: 380px;
            height: 380px;
            display: block;
        }

        .Info-Btns .gray a {
            border: 1px solid #999;
            color: #999;
        }

        .Info-Btns a b {
            left: 10px;
        }

        .Info-cost-bg {
            margin-top: 10px;
            background-color: #f1f1f1;
            padding-left: 10px;
            margin-left: -10px;
        }

        .Info-Btns a {
            width: 98px;
        }

        .buy-btn i {
            left: 15px;
        }

        .hr {
            width: 623px;
            height: 1px;
            border-top: 1px dashed #eee;
            margin: 10px -10px;
        }

    </style>
</head>
<body>
<%@ include file="/website/common/top.jsp" %>
<%@ include file="/website/common/head.jsp" %>
<%@ include file="/website/common/menu.jsp" %>

<input name="priceid" value="${bean.priceid }" type="hidden">
<input name="clscode" value="${bean.clscode }" type="hidden">
<input name="endTime" value="${productPromotions.flash_sale.endDate }" type="hidden">
<input name="nowTime" value="${productPromotions.flash_sale.now }" type="hidden">
<%--<input type="hidden" name="productmena" value="${bean.productname } ${bean.name }" />--%>
<div id="wrap-Info" style="background-color: #fff;">
    <div style="width: 100%; height: 3px; background-color: #0daeff;"></div>
    <div class="Info-hd inner">
    	<span><a href="${ctx }/website/index.jsp">首页</a>
    	<c:forEach items="${bean.clsnavs }" var="cls">
            > <a href="${ctx }/product/list?clscode=${cls.code }">${cls.name }</a>
            <input type="hidden" name="clsname" value="${cls.name }"/>
        </c:forEach>
    	 > <em class="col_84">${bean.productname } ${bean.name }</em>

    	</span>
    </div>
    <div class="Info-main inner clearfix pricture-wrap">
        <div class="Info-left">
            <div class="Info-left-pic">
                <div id="showbox" class="aaa">
                    <c:forEach items="${bean.photos }" var="photo">
                        <img src="<%=getRandomFileserver()%>${photo.getString("filepath")}" width="380" height="380"/>
                        <%--<input type="hidden" name="parductimg" value="<%=getRandomFileserver()%>${photo.getString("filepath")}">--%>
                    </c:forEach>
                </div>
                <div id="showsum"></div><!--展示图片里边-->
                <p class="showpage">
                    <a href="javascript:void(0);" id="showlast"> < </a>
                    <a href="javascript:void(0);" id="shownext"> > </a>
                </p>
                <div class="text-s">
                    <span>商品编号：${bean.code}</span>
                    <c:choose>
                        <c:when test="${islogin && isuserauth && !bean.isControl}">
                            <a class="collect-btn" href="javascript:;" onclick="productfavorite(this)">
                                <c:if test="${!bean.isfavorite }"><i class="fa fa-star-o"></i>收藏</c:if>
                                <c:if test="${bean.isfavorite }"><i class="fa fa-star"></i>已收藏</c:if>
                            </a>
                        </c:when>
                        <c:otherwise>
                                <a class="collect-btn" href="javascript:void(0);">
                                    <i class="fa fa-star-o"></i>收藏
                                </a>
                        </c:otherwise>
                    </c:choose>
                </div>
            </div>
            <div class="line8"></div>
        </div>

        <div class="Info-right">
            <div class="Info-right-hd">
                <h2 class="Info-title">${bean.productname } ${bean.name }</h2>
                <c:choose>
                    <c:when test="${empty productPromotions}">
                        <ul class="Info-cost Info-cost-bg clearfix">
                            <li>
                                <c:choose>
                                    <c:when test="${bean.isControl}">
                                        <p class="price">不在本区域销售</p>
                                    </c:when>
                                    <c:when test="${islogin && isuserauth }">
                                        <span>采购价 :</span>
                                        <span class="price">￥${bean.price}</span>
                                        <input type="hidden" name="productprice" value="${bean.price }"/>
                                    </c:when>
                                    <c:when test="${!islogin }">
                                        <span>采购价 :</span>
                                        <span class="price">登录可见</span>
                                    </c:when>
                                    <c:when test="${!isuserauth }">
                                        <span>采购价 :</span>
                                        <span class="price">审核通过可见</span>
                                    </c:when>
                                </c:choose>
                            </li>
                        </ul>
                    </c:when>
                    <c:otherwise>
                        <!-- 限时特卖 -->
                        <div class="time-kill">
                            <c:if test="${not empty productPromotions.flash_sale}">
                                <dvi class="kill-tit">
                                    <span>限时特卖</span>
                                    <span class="over-time">活动火热进行中</span>
                                </dvi>
                            </c:if>
                            <div class="kill-con">
                                <c:choose>
                                    <c:when test="${bean.isControl}">
                                        <p class="kill-price">采 购 价：<strong>不在本区域销售</strong></p>
                                    </c:when>
                                    <c:when test="${not empty productPromotions.flash_sale}">
                                        <p class="kill-price">秒 杀 价：<strong>￥${productPromotions.flash_sale.price}</strong>
                                            <span><i>￥${bean.price}</i><c:if test="${not empty productPromotions.flash_sale.description}">(${productPromotions.flash_sale.description})</c:if></span>
                                        </p>
                                    </c:when>
                                    <c:otherwise>
                                        <p class="kill-price">采 购 价：<strong>￥${bean.price}</strong></p>
                                    </c:otherwise>
                                </c:choose>
                                    <%--<div class="get-coupon">
                                        <span><i class="letter-s">领</i>券：</span>
                                        <ul>
                                            <li>50元无门槛</li>
                                            <li>满99减30</li>
                                        </ul>
                                        <div class="cl"></div>
                                    </div>--%>
                                <div class="sales-promotion">
                                    <span><i class="letter-s">促</i>销：</span>
                                    <div class="sales-list">
                                        <p>
                                            <c:if test="${not empty productPromotions.flash_sale}"><em>限购</em><c:choose><c:when test="${empty productPromotions.flash_sale.time}">无限制</c:when><c:otherwise>每人限购${productPromotions.flash_sale.time}件</c:otherwise></c:choose></c:if>
                                        </p>
                                        <c:if test="${not empty productPromotions.buy_send}">
                                            <p>
                                                <em>买送</em>买${productPromotions.buy_send.buyNumber}${bean.unitname}，送${productPromotions.buy_send.sendNumber}${bean.unitname}
                                                <span class="col-999"><c:if test="${not empty productPromotions.buy_send.description}">(${productPromotions.buy_send.description})</c:if></span>
                                            </p>
                                        </c:if>
                                        <c:if test="${not empty productPromotions.purchase_gift}">
                                            <p>
                                                <em>满赠</em>
                                                <c:forEach items="${productPromotions.purchase_gift.items}" var="item">
                                                    满<c:choose><c:when
                                                        test="${item.minMoney > 0}">${item.minMoney}元</c:when><c:otherwise>${item.minNumber}${bean.unitname}</c:otherwise></c:choose>,送
                                                    <c:forEach items="${item.gifts}" var="gift">
                                            <span class="sp-img"
                                                  onclick="javascript:window.open('${ctx}/product/info?priceid=${gift.productid}')">
                                            <img  onerror="this.src='/website//images/noimg.jpg'" class="small-img"
                                                  src="<%=getRandomFileserver()%>${gift.url}" alt=""
                                                  title="${gift.name}">x${gift.unit}
                                            <%--<span><img class="big-img" src="https://file.judayw.com//original/5688c46387d617433c000007.jpg" alt=""></span>--%>
                                            </span>,
                                                    </c:forEach>
                                                </c:forEach>
                                                <span class="col-999"><c:if test="${not empty productPromotions.purchase_gift.description}">(${productPromotions.purchase_gift.description})</c:if></span>
                                            </p>
                                        </c:if>
                                        <c:if test="${not empty productPromotions.money_off}">
                                            <p><em>满减</em>
                                                <c:forEach items="${productPromotions.money_off.items}" var="item">
                                                    <c:choose>
                                                        <c:when test="${not empty item.discountMoney}">满${item.offMoney}减${item.discountMoney};</c:when>
                                                        <c:otherwise>满${item.offMoney}打<fmt:formatNumber value="${item.discountRate}" pattern="#0.##"/> 折;</c:otherwise>
                                                    </c:choose>
                                                </c:forEach>
                                                <span class="col-999"><c:if test="${not empty productPromotions.money_off.description}">(${productPromotions.money_off.description})</c:if></span></p>
                                        </c:if>
                                    </div>
                                    <div class="cl"></div>
                                </div>
                            </div>
                        </div>
                    </c:otherwise>
                </c:choose>
            </div>
            <ul class="Info-details clearfix">
                <li><span class="dt"><em style="letter-spacing:7px;">通用</em>名：</span>${empty bean.b_tymz? "无":bean.b_tymz}</li>
                <li><span class="dt">生产厂家：</span><p style="font-size:14px;">${bean.b_chanjia}</p></li>
                <li><span class="dt">规　　格：</span>${bean.b_guige}</li>
                <li><span class="dt">批准文号：</span>${bean.b_pzwh}</li>
            </ul>

            <div class="hr"></div>
            <div class="Info-exp clearfix">
                <span class="dt">运　　费： 0 </span>
            </div>
            <div class="Info-buyNum clearfix">
                <span class="dt">数　　量： </span>
                <div class="buy-Num-bd">
                    <input type="text" name="amount" onblur="inputAmount(this)" <%--onkeyup="inputAmount(this)"--%>
                           class="buy-numInp" value="1"
                           maxnum="${bean.amount}" style="float:left;height:20px;line-height:20px;"/>
                    <span class="btn-reduce" onclick="lessenamount()">-</span>
                    <span class="btn-add" onclick="addamount()">+</span>
                    <p class="text"></p>
                </div>
                <span class="dt" style="margin-left: 5px">${bean.unit}</span>
                <span class="dt">　库存：
                    <c:choose>
                        <c:when test="${bean.amount>100}">>100</c:when>
                        <c:when test="${bean.amount<=0}">无</c:when>
                        <c:otherwise>${bean.amount }</c:otherwise>
                    </c:choose>
                </span>
            </div>
            <div class="Info-Btns clearfix">
                <c:choose>
                    <c:when test="${bean.amount>0 && bean.price > 0&& !bean.isControl}">
                        <div class="buy-btn">
                            <a sid="sid-cart-fly" href="javascript:void(0);" onclick="addtocart(event,this);"><i class="fa fa-cart-plus"></i>加入购物车</a>
                        </div>
                        <%--<div class="qingdan-btn">--%>
                            <%--<a href="javascript:;" onclick="handleOften(this)">--%>
                                <%--<c:if test="${!bean.isOften}"><i class="oftenflase"></i>加入常购清单</c:if>--%>
                                <%--<c:if test="${bean.isOften}"><i class="oftentrue"></i>已加入常购清单</c:if><b></b></a>--%>
                        <%--</div>--%>
                        <%--<div class="shouc-btn">--%>
                            <%--<a href="javascript:;" onclick="productfavorite(this)">--%>
                                <%--<c:if test="${!bean.isfavorite }"><i class="fa fa-star-o"></i>收藏商品</c:if>--%>
                                <%--<c:if test="${bean.isfavorite }"><i class="fa fa-star"></i>商品已收藏</c:if></a>--%>
                        <%--</div>--%>
                    </c:when>
                    <c:otherwise>
                        <div class="buy-btn gray">
                            <a href="javascript:void(0);" disabled="true"><i class="fa fa-cart-plus"></i>加入购物车</a>
                        </div>
                        <%--<div class="qingdan-btn gray">--%>
                            <%--<a href="javascript:void(0);" disabled="true">--%>
                                <%--<c:if test="${!bean.isOften}"><i class="oftenflase"></i>加入常购清单</c:if>--%>
                                <%--<c:if test="${bean.isOften}"><i class="oftentrue"></i>已加入常购清单</c:if>--%>
                                <%--<b></b></a>--%>
                        <%--</div>--%>
                        <%--<div class="shouc-btn gray">--%>
                            <%--<a href="javascript:void(0);" disabled="true">--%>
                                <%--<c:if test="${!bean.isfavorite }"><i class="fa fa-star-o"></i>收藏商品</c:if>--%>
                                <%--<c:if test="${bean.isfavorite }"><i class="fa fa-star"></i>商品已收藏</c:if>--%>
                            <%--</a>--%>
                        <%--</div>--%>
                    </c:otherwise>
                </c:choose>
            </div>
            <div class="tit">温馨提示：全平台商品满 <em class="cart-red">500</em> 元支持免费配送</div>
        </div>
    </div>


    <div class="Info-foot inner mt-20">
        <div class="Info-foot-left">
            <div class="Related-main clearfix">
                <div class="Related-hd">
                    <h2><b></b><span>猜你喜欢</span></h2>
                    <a href="${ctx }/product/list" target="_blank" id="maylikemore">更多></a>
                </div>
                <div class="Related-bd clearfix">
                    <ul id="maylike">

                    </ul>
                </div>
            </div>
        </div>

        <div class="Info-foot-right">
            <div class="tab-container" id="J_tab_info">
                <div class="tab-con-hd">
                    <ul class="tab-con-nav">
                        <li class="cur">商品详情</li>
                        <%--<li>说明书</li>--%>
                        <li>售后保障</li>
                    </ul>
                </div>
                <div class="tab-con-bd">
                    <div class="tab-con-bd-item">
                        ${bean.details }
                    </div>
                    <%--<div class="tab-con-bd-item hide">${bean.shuombook }</div>--%>
                    <%--<div class="tab-con-bd-item hide">${bean.aboutus }</div>--%>
                    <div class="tab-con-bd-item hide">
                        <div>
                            <h3>[ 药品验收 ] ：</h3>
                            <p style="line-height: 1.8em;">
                                您在收到商品时，签字确认前须对商品进行开箱检验，核实药品数量及规格是否相符、药品包装是否完好、是否与您购买的药品一致。如果您验货时发现药品包装破损、药品短缺或错误、药品存在表面质量问题、药品剩余保质期少于6个月（活动、促销、赠送或事先有明确的除外）等其中一项，您有权拒绝签字，并与业务员沟通退换货。
                                如您选择的是第三方物流配送，请签字后在配送人员面前进行上述条件的验收，如有不符合要求的，应让送货人员出具货物损毁证明，同时拨打我们服务电话400-805-5522进行联系确认，我们会尽快安排退换货。</p>
                        </div>
                        <div>
                            <h3 style="margin-top: 20px;">[ 退换政策 ] ：</h3>
                            <p style="line-height: 1.8em;">
                                您收到商品的7天内，符合下列药品退换货要求的，可以申请退换货。拨打巨达药网服务热线（400-805-5522）或跟当地业务员进行沟通，巨达药网将尽快安排处理。</p>
                            <p style="line-height: 1.8em;">1、由巨达药网原因失误造成发货错误或延迟送货的；</p>
                            <p style="line-height: 1.8em;">2、由于产品本身存在质量问题，经质量管理部门检验，确属质量问题的；</p>
                            <p style="line-height: 1.8em;">3、国家权威管理部门发布公告的产品（如停售、收回等）；</p>
                            <p style="line-height: 1.8em;">4、收到商品时，部分商品破损、溢漏、配件缺失，业务人员或快递人员当场确认的。</p>
                            <p style="line-height: 1.8em;">对不具备下列条件的，巨达药网将不予退换货：</p>
                            <p style="line-height: 1.8em;">1、在退换货之前您未与巨达药网客服或者当地业务员取得联系；</p>
                            <p style="line-height: 1.8em;">2、非质量问题且商品包装已被拆封；</p>
                            <p style="line-height: 1.8em;">3、因人为的非正确使用和储藏不当而出现质量问题；</p>
                            <p style="line-height: 1.8em;">4、退回商品外包装或其他商品附属物不完整或有毁损；</p>
                            <p style="line-height: 1.8em;">5、所需退货商品的批号、型号、规格与售出时不符；</p>
                            <p style="line-height: 1.8em;">6、商品并非巨达药网提供。</p>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(function () {
        //倒计时
        endTime = $("[name='endTime']").val();
        nowTime = $("[name='nowTime']").val();
        if (endTime && nowTime &&${not empty productPromotions.flash_sale && productPromotions.flash_sale.countDown==1}) {
            var set = setInterval(count_time, 1000);
        }
    })

    var endTime = null;
    var nowTime = null;
    function count_time() {
        var dalta_time = endTime - nowTime;//秒
        var h = parseInt(dalta_time / (60 * 60))//小时
        var m = parseInt(dalta_time / 60 % 60);//分钟
        var s = parseInt(dalta_time % 60); //秒
        nowTime++;

        if (dalta_time <= 0) {
            clearTimeout(set);
            $(".h").text("0");
            $(".m").text("0");
            $(".s").text("0");
        } else {
            $(".over-time").html('仅剩 :<i class="h"> ' + h + ' </i> 小时 <i class="m"> ' + m + ' </i> 分 <i class="s"> ' + s + ' </i> 秒');
        }
    }
</script>

<%@ include file="/website/common/foot.jsp" %>
<%@ include file="/website/common/sidebar.jsp"%>

<script src="${webctx }/js/Global.js"></script>
<script src="${webctx }/js/jqzoom.js"></script>
<script src="${webctx }/js/productinfo.js"></script>
<script src="${ctx }/plugins/cityselect_d/location.js"></script>

</body>
</html>
